package com.jtcoding.chat.dao.chat;

import com.jtcoding.chat.model.ChatRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author jason.tang
 * @create 2019-02-11 9:34
 * @description 聊天持久层
 */

@Mapper
public interface ChatDao {

    int addChatRecord(ChatRecord chatRecord);

    List<Integer> getChatListByNum(Integer userNum);

    List<ChatRecord> getChatRecordList(@Param("userNum") Integer userNum, @Param("friendNum") Integer friendNum);

    List<ChatRecord> getUnreadChatRecord(@Param("userNum") Integer userNum, @Param("friendNum") Integer friendNum);

    ChatRecord getReadChatRecord(@Param("userNum") Integer userNum, @Param("friendNum") Integer friendNum);
}
